from django.db import models
from django.db.models import ForeignKey

from course.models import CourseModel01
from user.models import UserModel
from utils.BaseModels import BaseModel


# Create your models here.
class CartModel(BaseModel):
    user = ForeignKey(UserModel,on_delete=models.CASCADE,null=True,verbose_name="用户")
    goods = ForeignKey(CourseModel01,on_delete=models.CASCADE,null=True,verbose_name="商品")
    selected = models.BooleanField(default=True,verbose_name="是否选中")
    class Meta:
        db_table = 'fgcart'
